﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'usp_UPDMS_FIT_FIGURE_MGT_Update')
	BEGIN
		DROP Procedure usp_UPDMS_FIT_FIGURE_MGT_Update
	END
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**	Name : usp_UPDMS_FIT_FIGURE_MGT_Update
**	Desc : 건강지수관리를 수정한다.
**	Test Exec Query : Exec usp_UPDMS_FIT_FIGURE_MGT_Update
**	Called by : Fit_Dac_UPDMS_FIT_FIGURE_MGT.cs
**	Program ID : Fit1012m
**	Auth : 송시명
**	Date : 2014-05-20
*******************************************************************************
**	Change History
*******************************************************************************
**	Date:		Author:		Description:
**	--------	--------	---------------------------------------
**	
*******************************************************************************/
CREATE PROC [dbo].[usp_UPDMS_FIT_FIGURE_MGT_Update]
@Seq int,
@Measure_Dt nvarchar(10),
@Body_Weight decimal(10,1),
@BMI decimal(10,2),
@Soft_Lean_Mass decimal(10,2),
@Body_Fat_Mass decimal(10,2),
@Body_Fat_Ratio decimal(10,2),
@Waist_Hip_Fat_Ratio decimal(10,2),
@Memo nvarchar(max),
@Attach_File_Info nvarchar(max),
@Create_User nvarchar(20),
@Create_Dt datetime,
@Update_User nvarchar(20),
@Update_Dt datetime
AS
SET NOCOUNT OFF

UPDATE UPDMS_FIT_FIGURE_MGT
   SET Measure_Dt = @Measure_Dt,
       Body_Weight = @Body_Weight,
       BMI = @BMI,
       Soft_Lean_Mass = @Soft_Lean_Mass,
       Body_Fat_Mass = @Body_Fat_Mass,
       Body_Fat_Ratio = @Body_Fat_Ratio,
       Waist_Hip_Fat_Ratio = @Waist_Hip_Fat_Ratio,
       Memo = @Memo,
       Update_User = @Update_User,
       Update_Dt = GETDATE()
 WHERE Seq = @Seq

--첨부파일 저장
EXEC usp_UPDMS_COM_FILE_Insert_Xml @Seq, 'Fit1012m', @Attach_File_Info

GO